<template>
  <div class="container">
  <div class="welcome">
    <div class="pink1">
    <pinkOcean />
    </div>
    <div class="pinkbox">
      <!-- 注册 -->
      <div class="signup nodisplay">
        <h1>注册</h1>
        <form autocomplete="off">
          <input type="text" placeholder="请输入您要注册的账号">
          <input type="email" placeholder="请输入您的邮箱">
          <input type="password" placeholder="请输入您的密码">
          <input type="password" placeholder="请确认您的密码">
          <button class="button submit">确认注册</button>
        </form>
      </div>

      <!-- 登录 -->
      <div class="signin">
        <h1>登陆账号</h1>
        <form class="more-padding" autocomplete="off">
          <input type="text" placeholder="请输入账号">
          <input type="password" placeholder="请输入密码">
          <button class="buttom sumbit">登陆</button>
        </form>
      </div>
    </div>

    <div class="leftbox">
      <button class="button" id="signin">登陆</button>
    </div>

    <div class="rightbox">
        <span>没有账号，去注册</span>
      <button class="button" id="signup">注册</button>
    </div>
  </div>
</div>   
</template>

<script>
import * as jquery from "jquery";
import 'echarts-liquidfill'
export default {
  data() {
    return {
      endId: ''
    }
  },
  watch: {
    endId(newvalue, oldvalue) {
      clearInterval(oldvalue)
      return newvalue
    }
  },
  mounted() {
    jquery('#signup').click(function() {
  jquery('.pinkbox').css('transform', 'translateX(80%)');
  jquery('.signin').addClass('nodisplay');
  jquery('.signup').removeClass('nodisplay');
});

jquery('#signin').click(function() {
  jquery('.pinkbox').css('transform', 'translateX(0%)');
  jquery('.signup').addClass('nodisplay');
  jquery('.signin').removeClass('nodisplay');
});
}
}
</script>

<style>
.pink1{
  /* z-index: 99; */
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 5px;
}
/* 容器的样式 */
.container {
  margin: auto;
  width: 650px;
  height: 550px;
  position: relative;
}

.welcome {
  /* overflow: hidden; */
  background: #f6f6f6;
  width: 650px;
  height: 415px;
  position: absolute;
  top: 25%;
  border-radius: 5px;
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1);
}

.pinkbox {
  position: absolute;
  top: -10%;
  left: 5%;
  background: #eac7cc;
  width: 320px;
  height: 500px;
  border-radius: 5px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease-in-out;
  z-index: 2;
}

.nodisplay {
  display: none;
  transition: all 0.5s ease;
}

.leftbox, .rightbox {
  position: absolute;
  width: 50%;
  top: -0px;
  transition: 1s all ease;
  z-index: 1;
}

.leftbox {
  left: -2%;
}

.rightbox {
  right: -2%;
}

/* 字体和按钮的样式 */
h1 {
  font-family: "Open Sans", sans-serif;
  text-align: center;
  margin-top: 95px;
  text-transform: uppercase;
  color: #f6f6f6;
  font-size: 2em;
  letter-spacing: 8px;
}

.title {
  font-family: "Lora", serif;
  color: #8e9aaf;
  font-size: 1.8em;
  line-height: 1.1em;
  letter-spacing: 3px;
  text-align: center;
  font-weight: 300;
  margin-top: 20%;
}

.desc {
  margin-top: -8px;
}

.account {
  margin-top: 45%;
  font-size: 10px;
}

p {
  font-family: "Open Sans", sans-serif;
  font-size: 0.7em;
  letter-spacing: 2px;
  color: #8e9aaf;
  text-align: center;
}



.flower {
  position: absolute;
  width: 150px;
  height: 150px;
  top: 45%;
  left: 27%;
  opacity: 0.8;
}

.smaller {
  width: 130px;
  height: 130px;
  top: 48%;
  left: 30%;
  opacity: 0.9;
}

button {
  padding: 12px;
  font-family: "Open Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 11px;
  border-radius: 10px;
  margin: auto;
  outline: none;
  display: block;
}

button:hover {
  color: #f6f6f6;
  transition: background-color 1s ease-out;
}

.button {
  margin-top: 3%;
  background: #f6f6f6;
  color: #ce7d88;
  border: solid 1px #eac7cc;
}

/* 表单样式 */
form {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-top: 7px;
}

.more-padding {
  padding-top: 35px;
}

.more-padding input {
  padding: 12px;
}

.more-padding .sumbit {
  margin-top: 45px;
}

.sumbit {
  margin-top: 25px;
  padding: 12px;
  border-color: #ce7d88;
}

input {
  background: #eac7cc;
  width: 65%;
  color: #ce7d88;
  border: none;
  border-bottom: 1px solid rgba(246, 246, 246, 0.5);
  padding: 9px;
  font-weight: 100;
}

input::placeholder {
  color: #f6f6f6;
  letter-spacing: 2px;
  font-size: 1.0em;
  font-weight: 100;
}

input:focus {
  color: #ce7d88;
  outline: none;
  border-bottom: 1.2px solid rgba(206, 125, 136, 0.7);
  font-size: 1.0em;
  transition: 0.8s all ease;
}

input:focus::placeholder {
  opacity: 0;
}

label {
  font-family: "Open Sans", sans-serif;
  color: #ce7d88;
  font-size: 0.8em;
  letter-spacing: 1px;
}

.checkbox {
  display: inline;
  white-space: nowrap;
  position: relative;
  left: -52px;
  top: 25px;
}

input[type=checkbox] {
  width: 15px;
  background: #ce7d88;
}

.checkbox input[type=checkbox]:checked + label {
  color: #ce7d88;
  transition: 0.5s all ease;
}
</style>